// src/pages/dataManager/Sidebar.tsx
import { Menu } from 'antd';
import { useNavigate } from 'umi';

interface SideBarProps {
  selectedKey: string;
}

const SideBar = ({ selectedKey }: SideBarProps) => {
  const navigate = useNavigate();

  const items = [
    {
      key: '/dataManager/RiceVarietiesList',
      label: '水稻品种列表',
    },
    {
      key: '/dataManager/user-track',
      label: '用户追踪',
    },
    {
      key: '/dataManager/ClusterListPage',
      label: '聚类列表',
    },
    {
      key: '/dataManager/rice-data',
      label: '水稻数据',
    },
    {
      key: '/dataManager/seedAgentManager',
      label: '种子代理管理',
    },
    {
      key: '/dataManager/user-comQuestion',
      label: '用户常见问题',
    },
    {
      key: '/dataManager/video-oss-relation',
      label: '视频和OSS关系',
    },
    {
      key: '/dataManager/InvitationManagement',
      label: '邀请码管理',
    },
  ];

  return (
    <Menu
      selectedKeys={[selectedKey]}
      items={items}
      onClick={({ key }) => navigate(key)}
      style={{ width: 200 }}
    />
  );
};

export default SideBar;
